import os
from flask_script import Manager, Server


from ris_tag import create_app

env = os.environ.get('RIS_TAG_ENV', 'Dev')
app = create_app('ris_tag.settings.%sConfig' % env.capitalize())

manager = Manager(app)
manager.add_command("server", Server())

if __name__ == "__main__":
    from werkzeug.contrib.fixers import ProxyFix

    app.wsgi_app = ProxyFix(app.wsgi_app)
    # manager.run()